import {Component, OnInit} from '@angular/core';
import {NavController, ToastController} from '@ionic/angular';
import {BasePage} from '../../common/basePage';
import {UrlAndOPT} from '../../common/url-and-opt.enum';
import {HttpService} from '../../services/http.service';

/**
 * 风险评估
 */
@Component({
  selector: 'app-risk-rating',
  templateUrl: './risk-rating.page.html',
  styleUrls: ['./risk-rating.page.scss'],
})
export class RiskRatingPage extends BasePage implements OnInit {

  public dataList: any[] = [];

  constructor(public navCtrl: NavController,
              public toastCtrl: ToastController,
              private service$: HttpService,
  ) {
    super(navCtrl, toastCtrl);
  }

  ngOnInit() {
  }

  private getDataList() {
    this.service$.doRequest(UrlAndOPT.auth_userInfo_func)
      .subscribe(obj => {
        if (obj) {
          this.dataList = obj;
        }
      });
  }

}
